package br.com.utfpr.sprites;

import android.app.Activity;
import android.content.Context;
import android.content.Intent;
import android.os.Bundle;
import android.view.Menu;
import android.view.MenuInflater;
import android.view.MenuItem;

public class MainActivity extends Activity {
	
	/** Called when the activity is first created. */
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.main);     
        ScoreManager scoreManager = new ScoreManager(getFilesDir().getAbsolutePath());
        scoreManager.manageScore(10);
        scoreManager.manageScore(20);     
    }
    
    @Override
    public boolean onCreateOptionsMenu(Menu menu) {
        MenuInflater inflater = getMenuInflater();
        inflater.inflate(R.layout.menu_main, menu);
        return true;
    }
    
    @Override
    public boolean onOptionsItemSelected(MenuItem item) {
        switch (item.getItemId()) {
	        case R.id.jogar:        
	        	startActivity(new Intent(MainActivity.this,Sprites2Activity.class));
	            break;
			case R.id.fechar:
				finish();
			            break;
			case R.id.resultados:
				startActivity(new Intent(MainActivity.this,ResultadosActivity.class));
			            break;
        }
        return true;
    }

}
